export default {
  /* 全局弹窗显示变量 */
  install (Vue) {
    /* 全局本地获取 */
    Vue.prototype.getLocalStorage = (keyName) => {
      return (localStorage.getItem(keyName))
    }
    /* 全局本地存储 */
    Vue.prototype.setLocalStorage = (keyName, keyValue) => {
      localStorage.setItem(keyName, keyValue)
    }

    /* websocket地址配置 */
    if (localStorage.getItem('IP') != null) {
      Vue.prototype.ws = new WebSocket('ws:' + localStorage.getItem('IP') + ':' + localStorage.getItem('WebSocketPort'))
    }
  }
}
